package com.aspire.kafkaproducer.config;


import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;


/**
 * @author kingSon
 * @version 1.0.0
 */
@ConfigurationProperties(prefix = "spring.kafka")
@Component
@Data
public class KafkaConf {

    private String bootstrapServers;

    private boolean enableAutoCommit;

    private String autoCommitIntervalMs;

    private String sessionTimeoutMs;

    private String groupId;

    private String autoOffsetReset;

    private int retries;

    private int batchSize;

    private int lingerMs;


    @Override
    public String toString() {
        return "KafkaConf [bootstrapServers=" + this.bootstrapServers + ", enableAutoCommit=" + this.enableAutoCommit
                + ", autoCommitIntervalMs=" + this.autoCommitIntervalMs + ", sessionTimeoutMs=" + this.sessionTimeoutMs
                + ", groupId=" + this.groupId + ", autoOffsetReset=" + this.autoOffsetReset + ", retries="
                + this.retries + ", batchSize=" + this.batchSize + ", lingerMs=" + this.lingerMs + ", bufferMemory="
                + "]";
    }
}
